<?php
	include_once "chude_db.php";
	include_once "danhmuc_db.php";
	
	class chude_bs
	{
		//--------------Field---------------
		private $MaChuDe = 0;
		public function SetMaChuDe($MaChuDe)         { $this->MaChuDe = $MaChuDe;         }
		public function GetMaChuDe()                 { return $this->MaChuDe;             }
		
		private $TenChuDe = "";
		public function SetTenChuDe($TenChuDe)       { $this->TenChuDe = $TenChuDe;       }
		public function GetTenChuDe()                { return $this->TenChuDe;            }
		
		private $MaTrangThai = -1;
		public function SetMaTrangThai($MaTrangThai) { $this->MaTrangThai = $MaTrangThai; }
		public function GetMaTrangThai()             { return $this->MaTrangThai;         }
		
		private $PIN = "";
		public function SetPIN($PIN)                 { $this->PIN = $PIN;                 }
		public function GetPIN()                     { return $this->PIN;                 }
		
		//--------------Method---------------
		public function Them()
		{
			$data = new chude_db();
			return $data->Them($this->MaDanhMuc, $this->TenChuDe, $this->MaTrangThai, $this->PIN);
		}
		
		public function CapNhat()
		{
			$data = new chude_db();
			return $data->CapNhat($this->MaChuDe, $this->TenChuDe, $this->MaTrangThai, $this->PIN);
		}
		
		public function Xoa()
		{
			$data = new chude_db();
			return $data->Xoa($this->MaChuDe);
		}
		
		public function LayTenChuDeTheoMaChuDe()
		{
			$data = new chude_db();
			return $data->LayTenChuDeTheoMaChuDe($this->MaChuDe, $this->MaTrangThai);
		}
		
		public function LayDanhSach()
		{
			$data = new chude_db();
			return $data->LayDanhSach($this->MaChuDe, $this->MaTrangThai);
		}
	}
?>